//
//  LSLiveSectionFooterView.m
//  LookScore
//
//  Created by wws on 2018/4/26.
//  Copyright © 2018年 ChongQingXunTiCompany. All rights reserved.
//

#import "LSLiveSectionFooterView.h"
#import "LSMarchDetailModel.h"
@implementation LSLiveSectionFooterView{
    
    UIImageView * _midImageView;
    UILabel * _leftLabel;
    UILabel * _rightLabel;
    
    
}

- (instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        [self addContentView];
    }
    return self;
}

- (void)addContentView{
    
    _midImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"jin"]];
    [self addSubview:_midImageView];
    _midImageView.sd_layout
    .centerXEqualToView(self)
    .centerYEqualToView(self);
    UIView * lineView = [[UIView alloc] init];
    lineView.backgroundColor = LSLineGrayColor;
    [self addSubview:lineView];
    lineView.sd_layout
    .topEqualToView(self)
    .centerXEqualToView(self)
    .widthIs(1)
    .bottomSpaceToView(_midImageView, 0);
    
    _leftLabel = [[UILabel alloc] init];
    _leftLabel.textColor = LSTitleGrayColor2;
    _leftLabel.textAlignment = NSTextAlignmentCenter;
    _leftLabel.font = LSFontSize12;
    [self addSubview:_leftLabel];
    
    _leftLabel.sd_layout
    .rightSpaceToView(_midImageView, 5)
    .centerYEqualToView(_midImageView)
    .autoHeightRatio(0);
    [_leftLabel setSingleLineAutoResizeWithMaxWidth:180];
    
    _rightLabel = [[UILabel alloc] init];
    _rightLabel.textColor = LSTitleGrayColor2;
    _rightLabel.textAlignment = NSTextAlignmentCenter;
    _rightLabel.font = LSFontSize12;
    [self addSubview:_rightLabel];
    _rightLabel.sd_layout
    .leftSpaceToView(_midImageView, 5)
    .centerYEqualToView(_midImageView)
    .autoHeightRatio(0);
    [_rightLabel setSingleLineAutoResizeWithMaxWidth:180];
    
    

    
    
    
}
- (void)setModel:(LSMarchDetailModel *)model{
    _model = model;
    
    _leftLabel.text = model.HomeTeamName_CN;
    _rightLabel.text = model.GuestTeamName_CN;
    
}


@end
